package nci60.data.connected
import nci60.data.protein.Protein
import nci60.data.maxquant.Project
import nci60.data.maxquant.peptide.Peptide

/**
 * This class connects the general protein information with the peptide identifications of an MaxQuant analysis in this protein
 *
 * @autor <a href="mailto:Florian.J.Auer@googlemail.com">Florian J. Auer</a>
*/
class PeptideInProtein {

    /**
     * The peptide information
     * @see nci60.data.maxquant.peptide.Peptide
     */
    Peptide peptide
    
    /**
     * Start position of peptide in protein amino acid sequence 
     */
    Integer position
    
    /**
     * is marked, if the peptide is razor in the protein
     * @see helper.UploadService#updatePeptideIsRazor(java.io.File, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, nci60.data.maxquant.Project)
     */
    boolean razor
    
    /**
    * reference to the analysis it belongs to <p />
    * @see nci60.data.maxquant.Project
    */
    Project currentProject
    
    /**
    * GRAILS <a href="http://grails.org/doc/latest/guide/GORM.html#gormAssociation" target="_blank">Associations in Gorm</a>
    * <p />
    * <style>.custom-table td{border-top:1pt solid grey;vertical-align:top;} .custom-table{border-collapse:collapse;width:100%;}</style>
    * <table class="custom-table">
    * <tr><td>
    *              protein
    * </td><td>        belongs to protein entry, in which the peptide is identified<p />
    *                  <b>See Also:</b> {@link nci60.data.protein.Protein}
    * </td></tr>
    * </table>
    */
    static belongsTo = [protein:Protein]

    /**
     * GRAILS <a href="http://grails.org/doc/latest/guide/single.html#constraints" target="_blank">Declaring Constraints</a>
     * <p />
     * Constraints in Grails are a way to declaratively specify validation rules for generating objects in GORM.
     */	
    static constraints = {
    }
}
